import Vue from 'vue'

import Vuex from 'vuex'

Vue.use(Vuex)
const store = new Vuex.Store({
	state: {
		lockInfo: null,
		lockList: [],
		tabBar: []
	},
	mutations: {
		//相当于同步的操作
		setLockInfo(state, val) {
			state.lockInfo = val;
		},
		setLockList(state, val) {
			state.lockList = val;
		},		
	},
	actions: {
		//相当于异步的操作,不能直接改变state的值，只能通过触发mutations的方法才能改变
	}
})
export default store